<?php

/**
 * 商品处理
 */

namespace app\credit\common;

class ShopCommon extends \app\member\common\MemberCommon {


    protected function addCart() {
        $data = request('post');
        if(!target('credit/Order', 'service')->addCart($this->userInfo['user_id'], $data)){
            $this->error(target('credit/Order', 'service')->getError());
        }
        $this->success('添加商品成功!');
    }

    protected function addFollow() {
        $data = request('post');
        $msg = target('credit/Shop', 'service')->addFollow($this->userInfo['user_id'], $data);
        if(!$msg){
            $this->error(target('credit/Shop', 'service')->getError());
        }
        $this->success($msg);
    }


}